package com.lovegu.spring.proxy;

/**
 * @author 老顾
 * @title: Client
 * @projectName java-restudy
 * @email: 1437594522@qq.com
 * @date 2022/9/25 14:24
 */
public class Client {
//    public static void main(String[] args) {
//        Host host = new Host();
//        //代理
//        Proxy proxy = new Proxy(host);
//        proxy.rent();
//        proxy.fare();
//        proxy.lease();
//        proxy.seeHouse();
//    }
public static void main(String[] args) {
    //真实业务
    UserServiceImpl2 userService = new UserServiceImpl2();
    //代理类
    UserServiceProxy proxy = new UserServiceProxy();
    //使用代理类实现日志功能！
    proxy.setUserService(userService);

    proxy.add();
}
}
